Optimal. Leaf size=154 \[ \frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 10, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {21, 3474, 3476, 329, 297, 1162, 617, 204, 1165, 628} \[ \frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 204
Rule 297
Rule 329
Rule 617
Rule 628
Rule 1162
Rule 1165
Rule 3474
Rule 3476
Rubi steps
\begin {align*} \int \frac {a B+b B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx &=B \int \frac {1}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}-B \int \sqrt {\cot (c+d x)} \, dx\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \operatorname {Subst}\left (\int \frac {\sqrt {x}}{1+x^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {(2 B) \operatorname {Subst}\left (\int \frac {x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}-\frac {B \operatorname {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}+\frac {B \operatorname {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \operatorname {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {B \operatorname {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {B \operatorname {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}+\frac {B \operatorname {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}+\frac {B \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {B \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}\\ &=-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.03, size = 34, normalized size = 0.22 \[ \frac {2 B \, _2F_1\left (-\frac {1}{4},1;\frac {3}{4};-\cot ^2(c+d x)\right )}{d \sqrt {\cot (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B b \tan \left (d x + c\right ) + B a}{{\left (b \tan \left (d x + c\right ) + a\right )} \cot \left (d x + c\right )^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.93, size = 658, normalized size = 4.27 \[ \frac {B \left (i \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )-i \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )+\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )+\sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )-2 \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {-1+\cos \left (d x +c \right )+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sin \left (d x +c \right ) \EllipticF \left (\sqrt {-\frac {-\sin \left (d x +c \right )-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right )+2 \cos \left (d x +c \right ) \sqrt {2}-2 \sqrt {2}\right ) \left (-1+\cos \left (d x +c \right )\right ) \cos \left (d x +c \right ) \left (1+\cos \left (d x +c \right )\right )^{2} \sqrt {2}}{2 d \left (\frac {\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.74, size = 126, normalized size = 0.82 \[ \frac {{\left (2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + 2 \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} B + 8 \, B \sqrt {\tan \left (d x + c\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.98, size = 64, normalized size = 0.42 \[ \frac {2\,B}{d\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}}+\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atan}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )}{d}-\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atanh}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ B \int \frac {1}{\cot ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________